﻿/*
 * @author: wizardc
 */

using System.Runtime.InteropServices;
using Unity.Mathematics;

namespace Dou.GPU
{
    /// <summary>
    /// GPU 常用定义
    /// </summary>
    public static class GPUDefine
    {
        public static readonly int Stride_Int = 4;
        
        public static readonly int Stride_Half = 2;
        public static readonly int Stride_Half2 = 4;
        public static readonly int Stride_Half3 = 6;
        public static readonly int Stride_Half4 = 8;
        
        public static readonly int Stride_Float = 4;
        public static readonly int Stride_Float2 = 8;
        public static readonly int Stride_Float3 = 12;
        public static readonly int Stride_Float4 = 16;
        
        public static readonly int Stride_Float2x2 = Marshal.SizeOf(typeof(float2x2));
        public static readonly int Stride_Float2x3 = Marshal.SizeOf(typeof(float2x3));
        public static readonly int Stride_Float2x4 = Marshal.SizeOf(typeof(float2x4));
        public static readonly int Stride_Float3x2 = Marshal.SizeOf(typeof(float3x2));
        public static readonly int Stride_Float3x3 = Marshal.SizeOf(typeof(float3x3));
        public static readonly int Stride_Float3x4 = Marshal.SizeOf(typeof(float3x4));
        public static readonly int Stride_Float4x2 = Marshal.SizeOf(typeof(float4x2));
        public static readonly int Stride_Float4x3 = Marshal.SizeOf(typeof(float4x3));
        public static readonly int Stride_Float4x4 = Marshal.SizeOf(typeof(float4x4));
    }
}
